/*
** init_number.c for  in /home/jousse_f//afs/rendu/math/103interpol
** 
** Made by florian jousseau
** Login   <jousse_f@epitech.net>
** 
** Started on  Tue Mar  1 17:27:30 2011 florian jousseau
** Last update Mon Mar  7 14:04:46 2011 florian jousseau
*/

#include "include/103.h"

void	init_numbers(t_number *nb)
{
  nb->x[0] = 0;
  nb->x[1] = 1;
  nb->x[2] = 2;
  nb->x[3] = 3;
  nb->x[4] = 5;
  nb->x[5] = 6;
  nb->y[0] = 2;
  nb->y[1] = 6;
  nb->y[2] = 8;
  nb->y[3] = 3;
  nb->y[4] = 7;
  nb->y[5] = 5;
}

void		init_pos(t_number *nb, t_pos *pos)
{
  int		i;
  double	up;

  i = 0;
  up = -1;
  while (i <= 90000)
    {
      pos->pos_x[i] = up;
      pos->pos_y[i] = algo_lagrange(nb, pos->pos_x[i]);
      up += 0.0001;
      i++;
    }
}
